package com.ruimei.entitys.enums;

import com.ruimei.util.CommUtil;

public enum LeaveType
{
  COMPASSIONATE_LEAVE("事假"),  SICK_LEAVE("病假"),  OTHERS("其他")
  ,  MARRIAGE_LEAVE("婚假"),  LOSE_LEAVE("丧假"),  MATERNITY_LEAVE("产假"),  NURSING_LEAVE("护理假");
  
  private String name;
  
  public static LeaveType values(String leaveType)
  {
    if (CommUtil.isEmpty(leaveType)) {
      return null;
    }
    switch (leaveType) {
      case "COMPASSIONATE_LEAVE":
        return COMPASSIONATE_LEAVE;
      case "SICK_LEAVE":
        return SICK_LEAVE;
      case "OTHERS":
        return OTHERS;
      case "MARRIAGE_LEAVE":
        return MARRIAGE_LEAVE;
      case "LOSE_LEAVE":
        return LOSE_LEAVE;
      case "MATERNITY_LEAVE":
        return MATERNITY_LEAVE;
      case "NURSING_LEAVE":
        return NURSING_LEAVE;
    }
    return null;
  }
  
  public static LeaveType value(Object leaveType)
  {
    return values(String.valueOf(leaveType));
  }
  
  private LeaveType(String name)
  {
    this.name = name;
  }
  
  public String getName()
  {
    return this.name;
  }
  
  public void setName(String name)
  {
    this.name = name;
  }
  
  public static LeaveType matching(String ch)
  {
    switch (ch)
    {
      case "事假":
        return COMPASSIONATE_LEAVE;
      case "病假":
        return SICK_LEAVE;
      case "其他":
        return OTHERS;
      case "婚假":
        return MARRIAGE_LEAVE;
      case "丧假":
        return LOSE_LEAVE;
      case "产假":
        return MATERNITY_LEAVE;
      case "护理假":
        return NURSING_LEAVE;
    }
    return OTHERS;
  }
}


/* Location:              E:\360MoveData\Users\admin\Desktop\teacher_wap-0.0.1-SNAPSHOT.jar!\BOOT-INF\classes\com\ruimei\entitys\enums\LeaveType.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       0.7.1
 */